home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: new-news.sprintlink.net!NEWS!not-for-mail
- From: jul395@prb.mhs.compuserve.com (Jonathan Julian)
- Subject: Is there a problem using memset on a malloc'd memory in HP-C
- Message-ID: <31a7cc$10b20.32c@NEWS>
- Date: Tue, 26 Mar 1996 21:14:46 GMT
- Organization: PRB Associates, Inc.
- X-Newsreader: Forte Free Agent 1.0.82
-
- I have searched your FAQ and found no reference to this problem.
-
- I am having trouble doing a malloc on memory that I allocated via
- malloc. I malloc'd the memory, memset it and immediately look at it
- and it is garbage. I have changed my mallocs to callocs, but later in
- my code I realloc. Since realloc does not initialize and I
- distrusting of memset I have written a loop to initialize my memory.
-
- The structure that I am trying to initialize is an array of pointers
- to pointers that I would initially like to be NULL. I am on HP
- a.09.07 using HP-C
-
- Thanks for your help.
-
- buc316@prb.mhs.compuserve.com
-
-
-